package com.newtype.meeting.client.widget.frontend;

import com.extjs.gxt.ui.client.Style.Scroll;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.VerticalPanel;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.newtype.meeting.client.model.Meeting;
import com.newtype.meeting.client.model.MeetingStart;
import com.newtype.meeting.shared.MeetingNotifyDTO;

public class MeetingPanel extends ContentPanel {
	private ListStore<MeetingStart> draftStore = new ListStore<MeetingStart>();
	private ListStore<Meeting> heldtoStore = new ListStore<Meeting>();
	private ListStore<Meeting> historyStore = new ListStore<Meeting>();
	private ListStore<MeetingNotifyDTO> noticeStore = new ListStore<MeetingNotifyDTO>();

	public MeetingPanel() {
		setHeading("会议管理首页");
		setLayout(new FitLayout());

		VerticalPanel vp = new VerticalPanel();
		vp.setScrollMode(Scroll.AUTO);
		vp.setSpacing(10);
		vp.add(new MeetingNoticeTabPanel(noticeStore));
		vp.add(new UnfinishedMeetingTabPanel(draftStore));
		vp.add(new HeldtoMeetingTabPanel(heldtoStore));
		vp.add(new HistoryMeetingTabPanel(historyStore));

		add(vp);
	}

	public ListStore<MeetingStart> getDraftStore() {
		return draftStore;
	}

	public ListStore<Meeting> getHeldtoStore() {
		return heldtoStore;
	}

	public ListStore<Meeting> getHistoryStore() {
		return historyStore;
	}

	public ListStore<MeetingNotifyDTO> getNoticeStore() {
		return noticeStore;
	}
}
